package com.hswizy.fishshop.rxjava;

import android.app.Application;
import android.util.Log;

import com.alibaba.baichuan.android.trade.AlibcTradeSDK;
import com.alibaba.baichuan.android.trade.callback.AlibcTradeInitCallback;
import com.alibaba.baichuan.trade.biz.core.taoke.AlibcTaokeParams;
import com.alibaba.baichuan.trade.biz.login.AlibcLogin;
import com.tencent.smtt.sdk.QbSdk;

public class MainApp extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        AlibcTradeSDK.asyncInit(this, new AlibcTradeInitCallback() {
            @Override
            public void onSuccess() {
                try {
                    AlibcTaokeParams params = new AlibcTaokeParams("mm_106145341_24770298_132244296", "mm_106145341_24770298_132244296", null);
                    AlibcTradeSDK.setTaokeParams(params);
                    AlibcLogin.getInstance().getSession();
                } catch (Exception e) {
                    Log.e("errors","catch");
                }
            }

            @Override
            public void onFailure(int code, String msg) {
                Log.e("errors",code + "-->" + msg);
            }
        });
        QbSdk.initX5Environment(this, new QbSdk.PreInitCallback() {
            @Override
            public void onCoreInitFinished() {


            }

            @Override
            public void onViewInitFinished(boolean b) {

            }
        });
    }
}
